#include <bits/stdc++.h>
using namespace std;
int main() {
//  string s1[3] = {"i", "j", "k"}, d1[3] = {"/100", "/10%10", "%10"} ;
//  string ans[9] = {"i/100", "i/10%10", "i%10", "j/100", "j/10%10", "j%10", "k/100", "k/10%10", "k%10",};
////  for (int i = 0; i < 3; i++) {
////      for (int j = 0; j < 3; j++) {
////          cout << "\"" << s1[i] + d1[j] << "\"" << ",";
////      }
////  }
//  for (int i = 0; i < 9; i++) {
//      for (int j = 0; j < 9; j++) {
//          if (i != j) {
//              cout << ans[i] << "==" << ans[j] << "||";
//          }
//      }
//  }
	int i, j, k ;
	for (i = 123; i < 333; i++) {
		j = i * 2;
		k = i * 3;
		if (i/100==i/10%10||i/100==i%10||i/100==j/100||i/100==j/10%10||i/100==j%10||i/100==k/100||i/100==k/10%10||i/100==k%10||i/10%10==i/100||i/10%10==i%10||i/10%10==j/100||i/10%10==j/10%10||i/10%10==j%10||i/10%10==k/100||i/10%10==k/10%10||i/10%10==k%10||i%10==i/100||i%10==i/10%10||i%10==j/100||i%10==j/10%10||i%10==j%10||i%10==k/100||i%10==k/10%10||i%10==k%10||j/100==i/100||j/100==i/10%10||j/100==i%10||j/100==j/10%10||j/100==j%10||j/100==k/100||j/100==k/10%10||j/100==k%10||j/10%10==i/100||j/10%10==i/10%10||j/10%10==i%10||j/10%10==j/100||j/10%10==j%10||j/10%10==k/100||j/10%10==k/10%10||j/10%10==k%10||j%10==i/100||j%10==i/10%10||j%10==i%10||j%10==j/100||j%10==j/10%10||j%10==k/100||j%10==k/10%10||j%10==k%10||k/100==i/100||k/100==i/10%10||k/100==i%10||k/100==j/100||k/100==j/10%10||k/100==j%10||k/100==k/10%10||k/100==k%10||k/10%10==i/100||k/10%10==i/10%10||k/10%10==i%10||k/10%10==j/100||k/10%10==j/10%10||k/10%10==j%10||k/10%10==k/100||k/10%10==k%10||k%10==i/100||k%10==i/10%10||k%10==i%10||k%10==j/100||k%10==j/10%10||k%10==j%10||k%10==k/100||k%10==k/10%10||
		    (i / 100) * (i / 10 % 10) * (i % 10 ) * (j / 100) * (j / 10 % 10) * (j % 10 ) * (k / 100) * (k / 10 % 10) * (k % 10 ) == 0 ) {
			//循环出来的结果 手动再把所有为零的情况写上 0×任何数为零
			continue;//补集
		}
		cout << i << " " << j << " " << k << endl;
	}
	return 0;
}

